{% extends 'layout.html ' %}

{% block content %}

<div>
    <div class="container">
        <div style="margin-bottom: 10px" calss="clearfix">
            <a class="btn btn-primary" href="/users/add/">添加用户</a>
            <!--查询-->
            <!--            <div style="float:right;width:300px;">-->
            <!--                <form method="get">-->
            <!--                    <div class="input-group">-->
            <!--&lt;!&ndash;                        搜索框&ndash;&gt;-->
            <!--                        <input type="text" name="search" class="form-control" placeholder="Search for..." value="{{ search_data }}">-->
            <!--                        <span class="input-group-btn">-->
            <!--                           <button class="btn btn-default" type="submit">-->
            <!--                               <span class="glyphicon glyphicon-search" aria-hidden="true"></span>-->
            <!--                           </button>-->
            <!--                        </span>-->
            <!--                    </div>-->
            <!--                </form>-->
            <!--            </div>-->

            <div class="panel panel-default">

                <div class="panel-heading">
                    <span class="glyphicon glyphicon-th" aria-hidden="true"></span>
                    用户管理表
                </div>

                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>用户编号</th>
                        <th>用户名</th>
                        <th>密码</th>
                        <th>真实姓名</th>
                        <th>用户邮箱</th>
                        <th>用户电话</th>
                        <th>操作</th>
                    </tr>
                    </thead>

                    <tbody>
                    {% for obj in queryset %}
                    <tr>
                        <th>{{ obj.user_id }}</th>
                        <th>{{ obj.user_name }}</th>
                        <th>{{ obj.user_pwd }}</th>
                        <th>{{ obj.user_real_name }}</th>
                        <th>{{ obj.user_email }}</th>
                        <th>{{ obj.user_tel}}</th>
                        <th>
                            <a class="btn btn-success btn-xs" href="/users/{{obj.user_id }}/edit/">编辑</a>
                            <a class="btn btn-danger btn-xs" href="/users/{{ obj.user_id }}/delete/">删除</a>
                        </th>
                    </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
            <ul class="pagination">
                {{ page_string }}
            </ul>
        </div>
        {% endblock %}